var t = getApp();

Page({
    data: {
        gifList: [],
        ad: {}
    },
    onLoad: function(a) {
        this.setData({
            ad: t.globalData.ad
        }), wx.showLoading({
            title: "加载中",
            mask: !0
        }), this.getGifList();
    },
    getGifList: function(t) {
        var a = this;
        wx.request({
            url: "https://ishare20.net/gifmaker/gif.json",
            success: function(t) {
                wx.hideLoading(), console.log(t.data), a.setData({
                    gifList: t.data
                });
            },
            fail: function() {
                wx.hideLoading(), wx.showToast({
                    title: "服务器炸掉了，过会再来吧。"
                });
            }
        });
    },
    toEditPage: function(t) {
        var a = t.currentTarget.dataset.id, i = this;
        console.log("./editGif?data=" + JSON.stringify(i.data.gifList[a - 1])), wx.navigateTo({
            url: "./editGif?data=" + JSON.stringify(i.data.gifList[a - 1])
        });
    },
    onShareAppMessage: function(t) {
        return {
            title: "GIF表情包制作",
            path: "/pages/gifmaker/gifmaker",
            imageUrl: "https://files.ishare20.net/gifmaker/res/wangjingze.png"
        };
    }
});